package proxy.staticproxy;

/**
 * @author : DuJiabao
 * @Date : 2021/3/4 17:48
 * @Project : design-pattern
 * @File : null.java
 * @Desc :
 */
public class TeacherDaoProxy implements ITeacherDao {
  private ITeacherDao iTeacherDao;

  public TeacherDaoProxy(ITeacherDao iTeacherDao) {
    this.iTeacherDao = iTeacherDao;
  }

  @Override
  public void teach() {
    System.out.println("代理正式开始");
    iTeacherDao.teach();
    System.out.println("代理结束");
  }
}
